package com.jf.cloud.biz.linstener;

import com.jf.cloud.biz.service.SendMessageService;
import com.jf.cloud.common.order.vo.SendNotifyBO;
import com.jf.cloud.common.rocketmq.config.RocketMqConstant;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@RocketMQMessageListener(topic = RocketMqConstant.SEND_ACTIVITY_AUDIT_NOTIFY_TO_SHOP_TOPIC,consumerGroup = RocketMqConstant.SEND_ACTIVITY_AUDIT_NOTIFY_TO_SHOP_TOPIC)
public class SendActivityAuditNotifyToShopConsumer implements RocketMQListener<SendNotifyBO> {
    @Autowired
    private SendMessageService sendMessageService;

    /**
     * 营销活动审核消息推送给商家
     * @param sendNotifyBO
     */
    @Override
    public void onMessage(SendNotifyBO sendNotifyBO) {
        sendMessageService.sendActivityNotifyMsgToShop(sendNotifyBO);
    }
}
